package com.zlzxm.shoesmarket.view.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.zlzxm.shoesmarket.R;
import com.zlzxm.shoesmarket.view.adapter.entity.EntityManageInfo;

import org.jetbrains.annotations.NotNull;

/**
 * CREATE BY zlzxm ON 4/23/21
 */
public class ADManageInfo extends BaseQuickAdapter<EntityManageInfo, BaseViewHolder> {

    public ADManageInfo() {
        super(R.layout.item_day_manage_info );
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, EntityManageInfo entity) {

        holder.setText(R.id.tvTitle,entity.getTitle());

        holder.setBackgroundResource(R.id.ivState,entity.getUp()?R.drawable.icon_up:R.drawable.icon_down);

        holder.setText(R.id.tvRate,entity.getRate());

    }
}
